package io.renren.modules.customer.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.renren.common.enums.GenderType;
import io.renren.common.enums.TelOperatorType;
import io.renren.common.jackson.TimestampDeserializer;
import io.renren.common.jackson.TimestampSerializer;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
 * 
 * 
 * @author Sean
 * @email seanla@qq.com
 * @date 2020-03-17 15:55:41
 */
@Data
@TableName("t_customer")
@Accessors(chain = true)
@ToString
public class CustomerEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId
	private Long id;
	/**
	 * 用户手机号码，唯一
	 */
	@NotBlank(message = "手机号码不能为空")
	private String mobilePhone;
	/**
	 * 来源文件
	 */
	@NotBlank(message = "来源文件不能为空")
	private String sourceFile;
	/**
	 * 姓名
	 */
	@NotBlank(message = "姓名不能为空")
	private String name;
	/**
	 * 区域
	 */
	@NotBlank(message = "客户所属区域不能为空")
	private String area;
	/**
	 * 城市
	 */
	@NotBlank(message = "客户所属城市不能为空")
	private String city;
	/**
	 * 运营商名称
	 */
	private TelOperatorType operatorName;
	/**
	 * 运营商品牌名称
	 */
	private String brandName;
	/**
	 * 运营商其他信息
	 */
	private String operatorInfo;
	/**
	 * 出生年月日
	 */
	@JsonSerialize(using = TimestampSerializer.class)
	@JsonDeserialize(using = TimestampDeserializer.class)
	private Date birthDay;
	/**
	 * 性别
	 */
	private GenderType gender;
	/**
	 * 身份证号码
	 */
	private String idNumber;
	/**
	 * 获客渠道
	 */
	@NotBlank(message = "获客渠道不能为空")
	private String channel;
	/**
	 * 名单来源
	 */
	private String channelSource;
	/**
	 * 是否购房
	 */
	@JsonProperty("ownHouse")
	@JsonFormat(shape = JsonFormat.Shape.NUMBER)
	private Boolean ownHouse;
	/**
	 * 房产购买时间
	 */
	@JsonSerialize(using = TimestampSerializer.class)
	@JsonDeserialize(using = TimestampDeserializer.class)
	private Date houseBuyTime;
	/**
	 * 月税后收入
	 */
	private Long monthlyIncome;
	/**
	 * 是否购车
	 */
	@JsonProperty("ownCar")
	@JsonFormat(shape = JsonFormat.Shape.NUMBER)
	private Boolean ownCar;
	/**
	 * 车辆是否抵押
	 */
	@JsonProperty("carPledge")
	@JsonFormat(shape = JsonFormat.Shape.NUMBER)
	private Boolean carPledge;
	/**
	 * 公积金最近连续缴纳月数
	 */
	private Integer depositPeriod;
	/**
	 * 平安寿险购买时间
	 */
	@JsonSerialize(using = TimestampSerializer.class)
	@JsonDeserialize(using = TimestampDeserializer.class)
	private Date pinganInsuranceTime;
	/**
	 * 获客标签
	 */
	private String label;
	/**
	 * 创建者ID
	 */
	private Long createUserId;
	/**
	 * 创建时间
	 */
	@JsonSerialize(using = TimestampSerializer.class)
	@JsonDeserialize(using = TimestampDeserializer.class)
	private Date createTime;

}
